<template>
	<view class="contina w">
		<view class="card">
			<view class="tip">
				以下是企业相关数据，点击可进入修改哦
			</view>
			<template v-for="item in list ">
				<view class="item" @click="to(item.id)">
					<view class="lf">
						<view class="lf_t">
							<view class="lf_v">
								<image class="lfImg" src="../../static/image/company.png"></image>
							</view>
							<view class="fl_name">
								{{ item.title }}
							</view>
						</view>
						<view class="lf_b">
							{{ item.tip }}
						</view>
					</view>
					<image src="../../static/image/back.png" class="to"></image>
				</view>
			</template>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						id: 1,
						title: "企业资料",
						tip: "查看或修改企业的详细信息"
					},
					{
						id: 2,
						title: "部门管理",
						tip: "管理企业部门架构，划分员工权限"
					},
					{
						id: 3,
						title: "岗位管理",
						tip: "管理企业岗位角色，划分岗位职责"
					},
					{
						id: 4,
						title: "员工管理",
						tip: "管理企业员工，所有员工数据都可在此查看"
					},
				],
				id: 0
			};
		},
		onLoad(option) {
			this.id = option.id
		},
		methods: {
			to(key) {
				switch (key) {
					case 1:
						uni.navigateTo({
							url: "/pagesB/entetiyZiliao/entetiyZiliao?edit=1&id=" + this.id
						})
						break;
					case 2:
						uni.navigateTo({
							url: "/pagesB/departmentMang/departmentMang?id=" + this.id
						})
						break;
					case 3:
						uni.navigateTo({
							url: "/pagesB/post/post?&id=" + this.id
						})
						break;
					default:
						break;
				}
			}
		}
	}
</script>

<style lang="scss">
	.card {
		margin-top: 20rpx;
		padding: 30rpx;

		.tip {
			font-size: 24rpx;
			font-weight: 400;
			color: #000000;
		}

		.item {
			height: 178rpx;
			box-sizing: border-box;
			background: #F8F9FD;
			border-radius: 20rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 30rpx;
			margin-top: 30rpx;

			.to {
				width: 15rpx;
				height: 28rpx;
			}

			.lf {
				.lf_t {
					display: flex;
					align-items: center;

					.lf_v {
						width: 60rpx;
						height: 60rpx;
						border-radius: 50%;
						background-color: #EAEDFC;
						display: flex;
						justify-content: center;
						align-items: center;

						.lfImg {
							width: 35rpx;
							height: 35rpx;
						}
					}

					.fl_name {
						font-size: 32rpx;
						font-weight: 400;
						color: #000000;
						margin-left: 20rpx;
					}

				}

				.lf_b {
					font-size: 28rpx;
					font-weight: 400;
					color: #999999;
					margin-top: 20rpx;
				}
			}
		}
	}
</style>